package com.b;

import java.util.Scanner;

/**
 * @author LW
 * @2020/10/9 10:26
 */
public class task3 {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入月收入！");
        double x = scanner.nextDouble();

        double a = 1500*0.05;
        double b = 3000*0.1;
        double c = 4500*0.2;
        double d = 26000*0.25;
        double e = 20000*0.3;
        double f = 25000*0.35;
        double a1 = x-3000;
        double tax;
        if (x>3000&&x<=4500){
            tax = a1*0.05;
            System.out.println(tax);
        }
        if (x>4500&&x<=7500){
            tax = a+(a1-1500)*0.1;
            System.out.println(tax);
        }
        if (x>7500&&x<=12000){
            tax = a+b+((a1-1500)-3000)*0.2;
            System.out.println(tax);
        }
        if (x>12000&&x<=38000){
            tax = a+b+c+(((a1-1500)-3000)-4500);
            System.out.println(tax);
        }
        if (x>38000&&x<58000){
            tax = a+b+c+d+((((a1-1500)-3000)-4500)-26000);
            System.out.println(tax);
        }
        if (x>58000&&x<83000){
            tax = a+b+c+e+(((((a1-1500)-3000)-4500)-26000)-20000);
            System.out.println(tax);
        }
        if (x>83000){
            tax = a+b+c+e+f+((((((a1-1500)-3000)-4500)-26000)-20000)-25000);
            System.out.println(tax);
        }


    }
}
